package com.xxxx;

import com.xxxx.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author achao
 * @version 1.0
 */
public class AdminUtils {

    private AdminUtils(){}
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
